from django.conf.urls import url
from phones import goods, user, admin, category
from django.contrib.auth.decorators import login_required

urlpatterns = [
    url(r'^reg/$', user.reg),  # 用户模块
    url(r'^nameReg/$', user.nameReg),
    url(r'^emailReg/$', user.emailReg),
    url(r'^sendEmail/$', user.sendEmail),
    url(r'^activitionsuc/$', user.activitionsuc),
    url(r'^login/$', user.login),
    url(r'^logout/$', user.logout),
    url(r'^getSession/$', user.getSession),
    url(r'^verify_code/$', user.verify_code),
    url(r'^pic_handle/$', user.pic_handle),
    url(r'^pic_show/$', user.pic_show),
    url(r'^verifyCheck/$', user.verifyCheck),
    url(r'^reviseByEmail/$', user.reviseByEmail),
    url(r'^infoCollection/$', user.infoCollection),
    url(r'^cancelCollection/$', user.cancelCollection),
    url(r'^history/$', user.history),
    url(r'^delHistory/$', user.delHistory),
    url(r'^isRevisePwd/$', user.isRevisePwd),
    url(r'^addUserInfo/$', user.addUserInfo),
    url(r'^fillUI/$', user.fillUI),
    url(r'^showCollection/$', user.showCollection),
    url(r'^showHistory/$', user.showHistory),
    url(r'^suanfa/$', user.suanfa),

    url(r'^catSort/$', category.catSort),  # 分类模块

    url(r'^goodsInfo/$', goods.goodsInfo),  # 商品模块
    url(r'^detailPara/$', goods.detailPara),
    url(r'^compare/$', goods.compare),
    url(r'^clearComparation/$', goods.clearComparation),
    url(r'^deleteOne/$', goods.deleteOne),
    url(r'^pageNum/$', goods.pageNum),
    url(r'^orderByCommentNum/$', goods.orderByCommentNum),
    url(r'^orderByPrice/$', goods.orderByPrice),
    url(r'^selectByScreen/$', goods.selectByScreen),
    url(r'^selectByRAM/$', goods.selectByRAM),
    url(r'^selectByROM/$', goods.selectByROM),
    url(r'^findByWords/$', goods.findByWords),
    url(r'^showThreea/$', goods.showThreea),
    url(r'^showThreehw/$', goods.showThreehw),
    url(r'^showThreev/$', goods.showThreev),
    url(r'^showFive/$', goods.showFive),
    url(r'^showSix/$', goods.showSix),
    url(r'^showFour/$', goods.showFour),
    url(r'^vegetablePrice/$', goods.vegetablePrice),  # 白菜价
    url(r'^commend/$', goods.commend),  # 特别推荐
    url(r'^findByType/$', goods.findByType),  # 根据型号查询 前端传型号给后端
    url(r'^showCompare/$', goods.showCompare),

    url(r'^adminLogin/$', admin.adminLogin),  # 后台管理员模块
    url(r'^adminLogout/$', admin.adminLogout),
    url(r'^addBrand/$', admin.addBrand),
    url(r'^addPhones/$', login_required(admin.addPhones)),
    url(r'^userPage/$', admin.userPage),
    url(r'^deleteOne/$', admin.deleteOne),
    url(r'^modify/$', admin.modify),
    url(r'^showUser/$', admin.showUser),
    url(r'^showDetail/$', admin.showDetail),
    url(r'^showInfo/$', admin.showInfo),
    url(r'^userNum/$', admin.userNum),
    url(r'^activeNum/$', admin.activeNum),
    url(r'^nowGoods/$', admin.nowGoods),
    url(r'^delete_user/$', admin.delete_user),
    url(r'^delete_goodsInfo/$', admin.delete_goodsInfo),
    url(r'^delete_detailInfo/$', admin.delete_detailInfo),
    url(r'^brandInfo/$', admin.brandInfo),
    url(r'^delBrand/$', admin.delBrand),
    url(r'^adminname/$', admin.adminname),
    url(r'^alogin/$', admin.alogin),
    url(r'^index/$', admin.index),
    url(r'^shopinfo/$', admin.shopinfo),
    url(r'^detailinfo/$', admin.detailinfo),
    url(r'^addbrand/$', admin.addbrand),
    url(r'^adminprofile/$', admin.adminprofile),
    url(r'^adminuser/$', admin.adminuser),
    url(r'^brandinfo/$', admin.brandinfo),
    # url(r'^shopinfo1/$', admin.shopinfo1),
]
